package com.tengju.user.application.user;

import com.tengju.user.application.user.dto.UserSearchForm;
import com.tengju.user.domain.model.doc.UserDocument;
import com.tengju.user.domain.model.user.UserIdCode;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

public interface UserDocumentService {

    Page<UserDocument> search(UserSearchForm form);

    List<UserDocument> findByIds(List<UserIdCode> userIdCodes);

    UserDocument findById(UserIdCode userIdCode);

    void saveAll(Iterable<UserDocument> entities);

    void deleteByIdCode(UserIdCode idCode);

    Map<String/* scrollId */, List<UserDocument>> searchScroll(UserSearchForm form);

    /**
     * 不超过5w条
     * @param form
     * @return
     */
    List<UserDocument> batchSearchScroll(UserSearchForm form);
}
